Repository navigation
fix(concerto-core): throw IllegalModelException for primitive nested paths - #1628
Atharva15007 wants to merge 1 commit into
Conversation
…paths Signed-off-by: Atharva15007 <datharva157@gmail.com>
|
Thank you for this change. It replaces the generic Error that getNestedProperty() throws when a property path runs through a primitive or enum with an IllegalModelException, which is the exception type the method documents, and it updates the existing test to assert that type. We have requested reviews from the Concerto maintainers. The CI runs are waiting for a maintainer to approve them before they start, so they will show as pending until then. Drafted by an Accord Project agent, reviewed by a maintainer. |
There was a problem hiding this comment.
Thanks for this fix. getNestedProperty() now throws IllegalModelException when a path runs through a primitive or enum, as its JSDoc and api.txt already promise. It matches the other throw in that method. IllegalModelException was already imported, the message text is unchanged, and the exception is an Error subclass, so existing catch-all callers keep working. The test now checks both the type and the message. I found nothing that needs changing, and it looks ready for a maintainer to approve. One housekeeping point below.
Nothing blocking; some suggestions below. Findings: 1 nit.
- nit · hygiene: Pull request #1629 makes the same change for issue #1627 (the same two lines in
getNestedProperty()and the same test update). Only one of the two needs to merge, so the other should be closed once a maintainer picks one.
Automated review by Mira, an Accord Project agent, at dcff0ec. Findings are labelled blocking, should-fix or nit; a maintainer makes the final call.
Closes #1627
-Fixes ClassDeclaration.getNestedProperty() to throw IllegalModelException instead of a generic JavaScript Error when nested property traversal encounters a primitive or enum property.
Changes
-Replaced the generic Error with IllegalModelException, including the model file and AST location context.
-Updated the regression test to verify that getNestedProperty() throws the expected IllegalModelException while preserving the existing error-message assertion.
Flags
-None
Screenshots or Video
-N/A
Related Issues
Author Checklist
--signoffoption of git commit.mainfromfork:branchname